package com.atgugui.eduservice.controller;

import com.atgugui.commonutils.Result;
import io.swagger.annotations.Api;
import org.springframework.web.bind.annotation.*;

/**
 * 讲师模块页面登录控制层
 */
@Api(tags = "讲师管理页面登录")
@RestController // @Controller + @ResponseBody
@RequestMapping("/eduservice/user")
@CrossOrigin
public class EduLoginController {
    /**
     * 登录
     */
    @PostMapping("/login")
    public Result login() {
        return Result.ok()
                .data("token","admin");
    }

    /**
     * 获取登录信息
     */
    @GetMapping("/info")
    public Result info() {
        return Result.ok()
                .data("roles","[admin]")
                .data("name","admin")
                .data("avatar","https://wpimg.wallstcn.com/f778738c-e4f8-4870-b634-56703b4acafe.gif");
    }

}
